<div id="wrap">
    <h1>三类占比</h1>
    <div class="statisticsNav">
        <div class="school">
            <h1>学校</h1>
            <ul></ul>
        </div>
        <div class="statisticsType_navSun">
            <a href="<?php echo $this->createUrl('/account/default/list',array('exam_id'=>$exam_id)); ?>" <?php if(empty($type)): ?>class="on"<?php endif; ?>><span>◆</span>学校占比</a>
            <a href="<?php echo $this->createUrl('/account/default/list',array('exam_id'=>$exam_id,'type'=>1)); ?>" <?php if($type==1): ?>class="on"<?php endif; ?>><span>◆</span>全区占比</a>
        </div>
        <p style="clear:both;"></p>
    </div>

    <div class="fl">
        <ul class="statisticsType_nav"></ul>
    </div>
    <div id="statisticsChart"></div>
    <input type="submit" value="导出" name="submit" class="b_a_n border_3 back_bgfb w80 height32 fontc_FFF fonts_12 cursor fr mr20 mt10 mb20 import_list" />
    <div id="statisticsTABLE">
        <table class="fontc_666 height32" align="center" valign="middle" border="0" cellpadding="0" cellspacing="0" width="100%">
            <thead class=" fontc_999" bgColor="#4e98bd" style="color:#fff;">
                <tr height="38">
                    <th width="150" align="center" valign="middle" class="border_d"><span style="padding:0 5px;"><?php if($type==1): ?>占全区比例<?php else: ?>占全校比例<?php endif; ?></span></th>
                    <th width="" align="center" valign="middle" class="border_d"><span style="padding:0 5px;">前30%学生占比</span></th>
                    <th width="" align="center" valign="middle" class="border_d"><span style="padding:0 5px;">中40%学生占比</span></th>
                    <th width="" align="center" valign="middle" class="border_d"><span style="padding:0 5px;">后30%学生占比</span></th>
                </tr>
                <tr height="38">
                    <th align="center" class="border_d" valign="middle" width="100"><span style="padding:0 5px;">学校</span></th>
                    <th align="center" class="border_d" valign="middle" width="50"><span style="padding:0 5px;"><?php echo $exam_array['exam_name']; ?></span></th>
                    <th align="center" class="border_d" valign="middle" width="50"><span style="padding:0 5px;"><?php echo $exam_array['exam_name']; ?></span></th>
                    <th align="center" class="border_d" valign="middle" width="50"><span style="padding:0 5px;"><?php echo $exam_array['exam_name']; ?></span></th>
                </tr>
            </thead>
            <tbody style="background:#fff;">
                <?php echo $tableList2; ?>
            </tbody>
        </table>
    </div>
</div>
<script>
    $(function(){
        var data = <?php echo $photo_json; ?>;
        YUEchart.ratioChart( $("#statisticsChart"),data );
        
        var exam_id = '<?php echo $exam_id; ?>';
        var type = '<?php echo $type; ?>';
        
        //导出相关数据
        $(".import_list").click(function(){
           $.get('/account/default/import_list', {exam_id: exam_id}, function(data) {
                if(data==1){
                    $.dialog.alert('导出数据不存在');
                }else{
                    window.location.href = '<?php echo $this->createUrl('/account/default/import_list'); ?>/exam_id/<?php echo $exam_id; ?>/type/<?php echo $type; ?>';
                }
                return false;
            });
        });
    });
</script>